<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="root"></div>

    <!-- React 18.2.0 -->
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>

    <!-- 引入 babel -->
    <script src="./js/babel.min.js"></script>

    <script type="text/babel">
      console.log(this);

      // 此处，会直接渲染成字符串方式
      // const vDOM = "<button>Hello React</button>";

      // 此处，就是在js里面写html代码，就是 jsx
      // 需要让浏览器支持这种jsx语法，需要通过 babel 转换一下。
      const vDOM = <button>Hello React</button>;

      const root = ReactDOM.createRoot(document.querySelector("#root"));

      root.render(vDOM);
    </script>
  </body>
</html>
